<!--
 * @Author: 庄东东
 * @Date: 2021-08-30 15:48:58
 * @LastEditTime: 2021-09-02 09:43:30
 * @LastEditors: 庄东东
 * @Description: 
 * @FilePath: \romance\src\page\index.vue
-->
<script lang="ts">
import { defineComponent } from "vue";
import { useRouter } from "vue-router";
export default defineComponent({
  setup() {
    const router = useRouter();
    let goPreference = () => {
      router.push("/preference");
    };
    let goUserInfo = () => {
      router.push("/userInfo");
    };
    return {
      goPreference,
      goUserInfo
    };
  }
});
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
</script>

<template>
  <div class="index">
    <div class="header">
      <van-button
        icon="friends-o"
        size="small"
        round
        color="#242B30"
        type="info"
        @click="goPreference"
      >
        偏好
      </van-button>

      <van-button
        icon="manager-o"
        size="small"
        round
        color="#242B30"
        type="info"
        @click="goUserInfo"
      >
        我的
      </van-button>
    </div>
    <div class="avatar">
      <div class="img">
        <van-image
          round
          width="100px"
          height="100px"
          src="https://img01.yzcdn.cn/vant/cat.jpeg"
        />
      </div>
    </div>
    <div class="avatar-btn">
      <van-button icon="clear" size="small" round type="info">
        next
      </van-button>
      <van-button icon="like" size="small" round type="danger">
        心动
      </van-button>
    </div>
    <div class="footer">
      <img src="../assets/svg.png" />
    </div>
  </div>
</template>
<style lang="less" scoped>
@primary-color: #1890ff;
.index {
  height: 100vh;
  overflow: hidden;
}
.header {
  color: #242b30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  /* font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px; */
}
.avatar-btn {
  color: #242b30;
  display: flex;
  justify-content: space-between;
  align-items: center;

  position: absolute;
  z-index: 12;
  width: 100vw;
  padding: 0 10px;
  box-sizing: border-box;
}
.avatar {
  height: 330px;
  width: 330px;
  margin: 0 auto;
  background: url("../assets/beijing.png");
  background-size: 100%;
  .img {
    height: 100px;
    width: 100px;
    margin: 0 auto;
    padding-top: 111px;
  }
}
.footer {
  z-index: 99;
  width: 100%;
  height: 30vh;
  position: fixed;
  bottom: 0;
  margin: auto;
  left: 0;
  right: 0;
  img {
    height: 100%;
    width: 100%;
  }
}
</style>
